package edu.gatech.asthma.ui_support;

import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import edu.gatech.asthma.R;

/**
 * UI support for the parent menu
 * Create menu items and inflate
 */
public class ParentMenu {
	
	public static boolean setUpParentMenu(Menu menu, Activity context) {
		SubMenu sub = menu.addSubMenu(context.getString(R.string.parent_menu_options));
	    sub.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
	    //sub.getItem().setIcon(R.drawable.icon_calendar);
	    context.getMenuInflater().inflate(R.menu.main, sub);
	    return true;
	}
}
